// var baseUrl="http://api.zhqjinrong.com"
// var baseUrl="http://192.168.1.207:18882"
String.prototype.replaceAll = function(s1, s2) {
	return this.replace(new RegExp(s1, "gm"), s2);
};

function getpar() {
	var url = location.href,
		nameValue,
		paraString = url.substring(url.indexOf("?") + 1, url.length).split("&"),
		paraObj = {};
	for (var i = 0; nameValue = paraString[i]; i++) {
		var name = nameValue.substring(0, nameValue.indexOf("=")).toLowerCase(),
			value = nameValue.substring(nameValue.indexOf("=") + 1, nameValue.length);
		if (value.indexOf("#") > -1) {
			value = value.split("#")[0];
		}
		paraObj[name] = value;
	}
	return paraObj
};
$(function() {
	var btnCanClick = true;
	//	var mySwiper = new Swiper('.swiper-container', {
	//
	//	})
	var url = window.location.search;
	var id = getpar().id;
	//	var id = url.slice(url.indexOf('=') + 1);

	// id.toString();

	// id="85332010704437248";
	$.post(baseUrl + "/order/get", {
		id: id,
		source: '3'
	}).then(function(res) {
		$("body").show("fast");
		$(".pay-btn").on('click', function() {

			var tar = $(this);
			if (tar.data('tar') == 'quxiao') {

				mui.confirm('确认取消订单', function(val) {
					if (val.index == 1) {
						// goHome()
						$.post(baseUrl + '/order/updateStatus', {
							source: 3,
							status: 7,
							id: res.data.id
						}, function(res) {
							if (res.code == 0) {
								if (isAndroid()) {
									Android.goHome();
								} else {
									//
									window.location.href = 'http://zlcGohome.com'

								}
							}
						})
					}
				})

			} else {
				var createTime = Date.parse(new Date(res.data.lotteryTime));
				var currentTime = Date.parse(new Date())
				if (currentTime > createTime) {
					mui.alert('该投注期数已开奖不能支付')
				} else {
					if (btnCanClick) {
						btnCanClick = false;
						$(this).css({
							background: 'grey'
						})
						var u = navigator.userAgent;
						if (u.indexOf('Android') > -1 || u.indexOf('Linux') > -1) {
							//安卓手机
							Android.goPay(id, res.data.period, res.data.lotteryId);
						} else if (u.indexOf('iPhone') > -1) {
							//苹果手机
							window.location.href = "https://www.zhuodonglai.com?id=" + id;
						}
					}
				}
			}
		})
		if (res.code == 0) {
			var uerserid = res.data.userId;
/*
			$.post(baseUrl + '/app/userorder/share/rq', {
				userId: uerserid,
				source: 3
			}, function(res) {
				document.getElementById('bg-img').src = baseUrl + res.data.image;

			});
*/
			var ticketStatus = res.data.ticketStatus; //0 未出票  1已出票  2已取消
			ticketStatus == 0 ? $('#ddStatus').html('待下单') : ticketStatus == 1 ? $('#ddStatus').html(' 已下单') : ticketStatus ==
				2 ? $('#ddStatus').html('已取消') : $('#ddStatus').html('未知')
			var doc = document.getElementById('logoImage');
			console.log(ticketStatus);
			var cpLotteryId = res.data.lotteryId;
			var cpInner = $(".cpInner");
			var cpQishu = $(".cpQishu");
			if (cpLotteryId == 11) {
				doc.src = "images/ssqLogo.jpg"
				cpInner.html("双色球");
			} else if (cpLotteryId == 14) {
				doc.src = "images/dltLogo.jpg"
				cpInner.html("大乐透");
			} else if (cpLotteryId == 12) {
				// 福彩3d
				doc.src = "images/3dLogo.jpg"
				cpInner.html("福彩3D");
			} else if (cpLotteryId == 15) {
				// 七星彩
				cpInner.html("七星彩");
				doc.src = "images/7startLogo.jpg"
			} else if (cpLotteryId == 16) {
				// 排列3
				cpInner.html("排列3");
				doc.src = "images/pl3Logo.jpg"
			} else if (cpLotteryId == 21 || cpLotteryId == 210) {
				// $('.maybeNoborder').css('border-bottom', '0.2vw solid #f4f5f7')
				doc.src = "images/logo3@2x.png"
				if (cpLotteryId == 21) {
					cpInner.html("竞猜足球");
					$('#numLottery').hide();
					$("#footballLottery").show();
					// 填充足彩的内容
					// $(".f1-right li:nth-child(2)").hide()
					//					$(".touzhuxinxi1").hide();
					//					console.log(res.data.orderBetJson + 'res.data.orderBetJson');
					//					JSON.stringify(res.data.orderBetJson);
					//					console.log(res.data.orderBetJson);
					if (res.data.orderBetJson) {
						var footballList = JSON.parse(res.data.orderBetJson);
						var footHtml = ''
						for (var ff = 0; ff < footballList.length; ff++) {
							var footballType = "";
							var touzhuNr = "";
							var footballRes = "";
							var relContent = footballList[ff];
							//							console.log(res.data.status + 'status');
							//奖金预测status 待出票 待开奖 未中奖 已中奖 待领奖  已领奖
							if (res.data.status != undefined && res.data.status <= 2) {
								//奖金预测
								$(".touzhuxinxi1").html(
									'<div style="color:#111;width: 23vw;font-size: 13px !important;">预计奖励</div><div style="color:red;font-size:0.43rem;width: 70vw;">' +
									res.data.expectedBonus + '元</div>');
								$(".touzhuxinxi1").show();
							} else {
								$(".touzhuxinxi1").hide();
							};
							for (var kkk = 0; kkk < relContent.betList.length; kkk++) {
								var mubiao = relContent.betList[kkk];
								var wanfa = "";
								var touzhuRel = "";
								var resRel = "";
								var caiguo = relContent.matchResultInfo ? relContent.matchResultInfo.split(",") : ['无', '无', '无', '无', '无'];

								var caiguoRes = ''
								if (mubiao.betNum >= 0 && mubiao.betNum <= 2) {
									wanfa = '胜平负'
									caiguoRes = caiguo[0] ? caiguo[0] : ''
								} else if (mubiao.betNum >= 3 && mubiao.betNum <= 5) {
									wanfa = relContent.letNum ? '让球' + "（" + relContent.letNum + "）" : "让球";
									caiguoRes = caiguo[1] ? caiguo[1] : ''
								} else if (mubiao.betNum >= 6 && mubiao.betNum <= 14) {
									wanfa = '半全场'
									caiguoRes = caiguo[2] ? caiguo[2] : ''
								} else if (mubiao.betNum >= 15 && mubiao.betNum <= 45) {
									wanfa = '比分'
									caiguoRes = caiguo[3] ? caiguo[3] : ''
								} else if (mubiao.betNum >= 45 && mubiao.betNum <= 53) {
									wanfa = '总进球'
									caiguoRes = caiguo[4] ? caiguo[4] : ''
								}
								if (caiguoRes.indexOf("-") != -1 || caiguoRes == "") {
									caiguoRes = "无"
								}
								touzhuRel = scoreMap[mubiao.betNum];
								footballType += ` <p>${wanfa}</p>`;

								// resRel=mubiao.winFlag?'中奖':'未中奖123123123123'
								// if(mubiao.winFlag=='已中奖'){
								//     footballRes+=`<p style="color:red">${mubiao.winFlag}</p>`
								// }else{
								//									console.log(caiguoRes,touzhuRel)
								//								var	matchResult=scoreMap[res.data.orderBetJson.matchResult];
								//								console.log(matchResult)
								if (caiguoRes == touzhuRel) {
									touzhuNr += `<p style="color:red">${touzhuRel} ${mubiao.odds}</p>`;
									footballRes += `<p  style="color:red">${caiguoRes}</p>`
								} else {
									touzhuNr += `<p>${touzhuRel} ${mubiao.odds}</p>`;
									footballRes += `<p >${caiguoRes}</p>`
								}
								// }
							};
							footHtml +=
								`
                               <ul class="needFlex resultMain footballContent" >
                        <li class="conten-border needFlex">${relContent.matchField}</li>
                        <li class="conten-border needFlex">${relContent.hostTeam.substring(0,4)}<br>
                        VS<br>
                    ${relContent.guestTeam.substring(0,4)}
                        </li>
                        <li class="conten-border needFlex">
                            ${footballType}
                        </li>
                        <li class="conten-border needFlex">
                            ${touzhuNr}
                        </li>
                        <li class="conten-border needFlex">
                            ${footballRes}
                        </li>
                    </ul>
                         `
						}
						//						console.log(caiguoRes)
						$('.result-title').after(footHtml);
						var xxType = '';
						if (footballList) {
							xxType = footballList[0].playType;
						}

						$(".footballTz").html(
							`<span class="content-rel-biaoqian" >${xxType==1?'胜平负':xxType==2?'让球胜平负':xxType==3?'比分':xxType==4?'总进球数':xxType==5?'半全场':xxType==6?'混合投注':xxType==7?'单关固定':xxType==8?'猜一场':xxType==9?'2选1':''}</span><span class="content-rel-biaoqian" >${res.data.betBunch.replaceAll('-','串')}</span><span class="content-rel-biaoqian" >${res.data.betNum}注</span><span class="content-rel-biaoqian" >${res.data.betTimes}倍</span>`
						)
					}
				} else if (cpLotteryId == 210) {
					var taaa = res.data
					cpInner.html("竞猜足球-猜冠军");
					$('#numLottery').hide();
					$("#footballLottery").show();
					$('#relContent').hide();
					$('#judge-winner-container').show();
					$('#judge-winner-content>li:nth-child(2)').html(taaa.createTime.slice(0, 10));
					var winnerArr = "";
					var orderGet = JSON.parse(taaa.orderBetJson)[0].betList
					for (var winner = 0; winner < orderGet.length; winner++) {
						var left = orderGet[winner].slice(0, orderGet[winner].indexOf(' '))
						var right = orderGet[winner].slice(orderGet[winner].indexOf(' '))
						winnerArr +=
							`
                            <p class="needFlex" style="flex-direction: column"><span style="display: inline-block;margin-bottom:5px;">${left}</span><span>${right}</span></p>
                        `
					}
					$('.special-xunhuan').html(winnerArr);
					$('#judge-winner-content>li:nth-child(4)').html(JSON.parse(taaa.orderBetJson)[0].winFlag);
					$(".footballTz").html(
						`<span class="content-rel-biaoqian" >单关</span><span class="content-rel-biaoqian" >${res.data.betNum}注</span><span class="content-rel-biaoqian" >${res.data.betTimes}倍</span>`
					)
				}

			}
			var status = res.data.status;
			var statusHtml = $("#status");
			var orderTime = res.data.createTime;
			$("#orderTime2").text(orderTime);
			$("#orderTime3").text(orderTime);
			$("#orderTime1").text(orderTime);
			var lotteryNum = res.data.lotteryNum;
			// 中奖金额
			var price = res.data.prize;
			var shuihouPrice = parseInt(res.data.afterTax);
			// 红篮球
			var ball = res.data.lotteryNum;
			if (ball) {
				var redNum = ball.slice(0, ball.indexOf('|')).split(',');
				var blueNum = ball.slice(ball.indexOf('|') + 1).split(',');
			}

			$(".ldd-container").show();
			if (redNum) {
				for (var i = 0; i < redNum.length; i++) {
					if (redNum[i]) {}
					$("#redContent").append(`<span style="margin-right:3px">${redNum[i]}</span>`);
				}
				$("#redContent").append(`&nbsp;&nbsp;`);
			}
			if (blueNum) {
				for (var b = 0; b < blueNum.length; b++) {
					$("#blueContent").append(`<span style="margin-right:3px">${blueNum[b]}&nbsp;</span>`);
					//			
				}
			}

			if (res.data.ticketList) {
				var ticketList = res.data.ticketList;
			}
			var orderNum = res.data.id;

			//			cpQishu.html(res.data.period);//改为玩法
			var des = "";
			xxType == 1 ? des = '胜平负' : xxType == 2 ? des = '让球胜平负' : xxType == 3 ? des = '比分' : xxType == 4 ? des = '总进球数' :
				xxType == 5 ? des = '半全场' : xxType == 6 ? des = '混合投注' : xxType == 7 ? des = '单关固定' : xxType == 8 ? des = '猜一场' :
				xxType == 9 ? des = '2选1' : des = '';
			cpQishu.html(des)

			if (res.data.orderBetList) {
				if (res.data.orderBetList.length > 0) {
					var orderNum = res.data.orderBetList[0].orderId;
					var lotteryTime = res.data.orderBetList[0].lotteryTime
				}
			}
			var lotteryId = res.data.lotteryId;
			res.data.payAmount = parseInt(res.data.payAmount);
			$("#howMuch").html(res.data.payAmount);
			// if(lotteryId==11){
			//     cpInner.html("双色球");
			// }else if(lotteryId==14){
			//     cpInner.html("大乐透");
			// }else if(lotteryId==12){
			//     cpInner.html("福彩3D");
			// }else if(lotteryId==16){
			//     cpInner.html("排列3");
			// }else if(lotteryId==15){
			//     cpInner.html("七星彩");
			// }
			//                    投注内容
			//             var html="";
			//             var html2=""
			//             var arr=res.data.orderBetList
			//             for(var i=0;i<arr.length;i++){
			//                 var res=arr[i];
			//                 var betTimes=res.betTimes;
			//                 var betNum=res.betNum;
			//
			//                 betTimes==1?betTimes='单式':betTimes='复式';
			//                 html2+=`
			//                             <span class="content-rel-biaoqian">投注${betNum}倍</span>
			//                         `;
			//                 html+=`
			//                                 <li class="content-rel"><span class="content-rel-title">${betTimes}${betNum}注</span> <span>${res.redNum} + <span style="color:#449cff">${res.blueNum}</span></span></li>
			//                             `;
			//             }
			//             $(".touzhuxinxi").before(html);
			//             $("#touzhuneirong").html(html2);
			// status=6;
			// 投注内容
			// 内容
			if (res.data.orderBetList) {
				var arr = res.data.orderBetList;
				// 投注内容循环
				var html3 = ""
				for (var i = 0; i < arr.length; i++) {
					var redMl = "";
					var blueMl = "";

					// 投注详情红球双色球或者大乐透
					if (lotteryId == 11 || lotteryId == 14) {
						if (arr[i].redNum) {
							var redArr = arr[i].redNum.split(',');
							for (var k = 0; k < redArr.length; k++) {
								// 判断是否为胆拖
								if (redArr[k] instanceof Array) {
									redMl +=
										`<span style=";border:none;word-wrap: break-word;word-break:break-all;white-space: pre-wrap !important;background:none">胆（${redArr[k]}）&nbsp;</span>`
								} else {
									redMl += `<span style="">${redArr[k]}&nbsp;</span>`
								}
							}
						}
						if (arr[i].blueNum) {
							var blueArr = arr[i].blueNum.split(',');
							// 判断是否为胆拖
							for (var j = 0; j < blueArr.length; j++) {
								if (blueArr[j] instanceof Array) {
									blueMl +=
										`<span style="color:#449cff;word-wrap: break-word;word-break:break-all;white-space: pre-wrap !important;">胆（${blueArr[j]}）&nbsp;</span>`
								} else {
									blueMl += `<span style="color:#449cff">${blueArr[j]}&nbsp;</span>`
								}
							}
						}
					} else {
						// 如果为3d排列3或者七星彩
						if (arr[i].redNum) {
							// var redArr=arr[i].redNum.replace(',','').replace('|',' ')
							var betNum = arr[i].redNum.replace(/,/g, '').replace(/\|/g, ' ')
							redMl += `<span style="">${betNum}&nbsp;</span>`
							// for(var s=0;s<redArr.length;s++){
							//     var find=redArr[s].toString();
							//     // if(find.indexOf('|')!=-1){
							//     //     var left=find.slice(0,find.indexOf('|'));
							//     //     var right=find.slice(find.indexOf('|')+1)
							//     //     redMl+=`<span style="word-wrap: break-word;word-break:break-all;white-space: pre-wrap !important;">${left}&nbsp;</span>`;
							//     //     redMl+=`<span style=";border:none;background:none"> |&nbsp;</span>`;
							//     //     redMl+=`<span style="word-wrap: break-word;word-break:break-all;white-space: pre-wrap !important;">${right}&nbsp;</span>`
							//     // }else{
							//         redMl+=`<span style="">${redArr[s]}&nbsp;</span>`
							//
							// }
						}
					}
					// 判断玩法
					var playType;
					var betTime
					var resPlayType = arr[i].playType
					if (lotteryId == 11 || lotteryId == 14) {
						resPlayType == null ? playType = '' : resPlayType == 1 ? playType = '' : resPlayType == 2 ? playType = '胆拖' :
							''
						betTime = parseInt(arr[i].betNum) / parseInt(arr[i].betTimes) > 1 ? '复式' : "单式";
					} else if (lotteryId == 12 || lotteryId == 16) {
						resPlayType == null ? playType = '' : resPlayType == 1 ? playType = '直选' : resPlayType == 2 ? playType =
							'组三单式' : resPlayType == 3 ? playType = '组三复式' : resPlayType == 4 ? playType = '组六' : '';
						betTime = "";
					} else if (lotteryId == 15) {
						playType = '';
						betTime = parseInt(arr[i].betNum) / parseInt(arr[i].betTimes) > 1 ? '复式' : "单式";
					}
					html3 +=
						` <li class="content-rel bianhua needFlex" style="display: flex;justify-content: space-between"><span class="content-rel-title" style="display: inline-block;width:2.2rem;margin-right:0">${playType}${betTime}</span><span class="needFlex" style="width:7.8rem;flex-wrap: wrap"><span style="color:#ff555c;flex-wrap: wrap" class="needFlex">${redMl}${blueMl}</span></span></li>`
					// =======
					//                 ${arr[i].betNum}注
					// html3+=` <li class="content-rel bianhua needFlex" style="display: flex;justify-content: space-between"><span class="content-rel-title" style="display: inline-block;width:30%;margin-right:0">${betTime}${arr[i].betNum}注</span><span class="needFlex" style="width:50%;flex-wrap: wrap">${redMl} <span style="color:#686667"> + </span> ${blueMl}</span></li>`
				}
				$("#kaijiangNum").after(html3)
				$("#touzhuxinxi").html("投注" + res.data.betTimes + '倍');
				$("#touzhushuliang").html('投注' + res.data.betNum + "注");
				// 投注内容完
			}
			// 判断是否显示图片
			if (res.data.ticketShow == 0) {
				$("#bannerWeizhong").hide();
				$('#zhongjiangbannerContainer').hide();
			}
			$("#orderTime1").html(orderTime);
			if (status == 0 && res.data.lotteryId !== "210") {
				console.log("订单状态" + status)
				statusHtml.html("待下单");
				$("#kaijiangNum").hide();
				$('.statuekz').show();
				$("#bhTime").show();
				$('.pay-btn').show();
				$("#orderTime1").html(orderTime);
				$("#orderTime2").html(orderTime);
				$("#orderTime3").html(orderTime);
				$("#orderNum1").html(orderNum);
				$("#orderNum2").html(orderNum);
				$("#orderNum3").html(orderNum);
			} else if (status == 1) {
				statusHtml.html("待出票");
				$("#kaijiangNum").hide();
				$("#bhTime").hide();
				//                        下单时间

			} else if (status == 2 || status == 9) {
				$("#kaijiangNum").hide();
				status == 2 ? statusHtml.html("待开奖") : statusHtml.html("已下单")
				$("#orderTime1").html(orderTime);
				$("#orderTime2").html(orderTime);
				$("#orderTime3").html(orderTime);
				$("#orderNum1").html(orderNum);
				$("#orderNum2").html(orderNum);
				$("#orderNum3").html(orderNum);
				$('.touzhuNeirong').append(
					`
                            <li class="content-rel needFlex kjshijianTime" style=""><span class="content-rel-title" style="display: inline-block;width:2.2rem;margin-right:0">开奖时间</span> <span style="display: inline-block;width:7.8rem;">${lotteryTime}</span></li>
                        `
				)
				if (res.data.lotteryId == 21 || res.data.lotteryId == 210) {
					$('.kjshijianTime').hide()
				}
				// statusHtml.html("未中奖");
				console.log("订单状态" + status)
			} else if (status == 3) {
				$("#orderTime1").html(orderTime);
				$("#orderTime2").html(orderTime);
				$("#orderTime3").html(orderTime);
				$("#orderNum1").html(orderNum);
				$("#orderNum2").html(orderNum);
				$("#orderNum3").html(orderNum);
				$("#bhTime").hide();
				$("#kaijiangNum").show();
				// $("#bh3").show();
				$("#bhTime").show();
				console.log("订单状态" + status)
				statusHtml.html("未中奖");
				// $("#kaijiangContent").html(lotteryNum);
				$("#bannerWeizhong>img").attr('src',
					`${ticketList&&ticketList.length>0&&ticketList[0].ticketUrl?baseUrl+ticketList[0].ticketUrl:''}`);

			} else if (status >= 4 && status <= 6) {
				if (status == 4) {
					statusHtml.html("已中奖");
					$("#zj").css("display", "block");
					$("#ddStatus").css("display", "none");
				} else if (status == 5) {
					statusHtml.html("待领奖");
					$("#zj").css("display", "block");
					$("#ddStatus").css("display", "none");
				} else if (status == 6) {
					statusHtml.html("已领奖");
					$("#bh4").hide();
					$("#zj").css("display", "block");
					$("#ddStatus").css("display", "none");
				} else if (status == 7) {
					statusHtml.html("已取消");
					$("#zj").css("display", "none");
					$("#ddStatus").css("display", "block");
				}

				$("#orderTime1").html(orderTime);
				$("#orderTime2").html(orderTime);
				$("#orderTime3").html(orderTime);
				$("#orderNum1").html(orderNum);
				$("#orderNum2").html(orderNum);
				$("#orderNum3").html(orderNum);
				$("#bhTime").hide();
				$("#kaijiangNum").show();
				// $("#kaijiangContent").html(lotteryNum);
				$("#bh4").show();
				$('.zjjeNeedHide').hide()
				if (parseInt(price) == 0) {
					$(".shuiqianNum").html('--');
					$(".shuihouNum").html('--');
					$('#price').html('--')
				} else {
					console.log(price + 'true1');
					$(".shuiqianNum").html(shuihouPrice + '元');
					$(".shuihouNum").html(shuihouPrice + '元');
					$('#price').html(shuihouPrice);
					$('#price').css({
						color: 'red'
					})
				}

				var html3 = "";
				//                        禁止滑动
				if (ticketList && ticketList.length <= 1) {
					//					mySwiper.allowSlideNext = false;
					//					mySwiper.allowSlidePrev = false;

					for (var i = 0; i < ticketList.length; i++) {
						var tar = ticketList[i];
						html3 += `<div class="swiper-slide"><img src="${baseUrl}${tar.ticketUrl}" alt=""></div>`;
					}
				}
				$("#zhongjiangBanner").html(html3);
				console.log("订单状态" + status)
				$("#bh4").hide();
				$("#bhTime").show();
			} else if (status == 7) {
				statusHtml.html("已取消");
				$("#zj").css("display", "none");
				console.log("订单状态" + status)

				$("#ddStatus").css("display", "block");
			}
			// else if(status==5){
			//     statusHtml.html("已领奖");
			//      $("#orderTime1").html(orderTime);
			//      $("#orderTime2").html(orderTime);
			//      $("#orderTime3").html(orderTime);
			//      $("#orderNun1").html(orderNum);
			//      $("#orderNun2").html(orderNum);
			//      $("#orderNun3").html(orderNum);
			//      $("#bhTime").hide();
			//      $("#kaijiangNum").show();
			//      // $("#kaijiangContent").html(lotteryNum);
			//      $("#bh4").show();
			//      $(".shuiqianNum").html(price+'元');
			//      $(".shuihouNum").html(shuihouPrice+'元');
			// }else if(status==6){
			//     statusHtml.html("待领奖（人工审核）");
			//      $("#orderTime1").html(orderTime);
			//      $("#orderTime2").html(orderTime);
			//      $("#orderTime3").html(orderTime);
			//      $("#orderNun1").html(orderNum);
			//      $("#orderNun2").html(orderNum);
			//      $("#orderNun3").html(orderNum);
			//      $("#bhTime").hide();
			//      $("#kaijiangNum").show();
			//      // $("#kaijiangContent").html(lotteryNum);
			//      $("#bh4").show();
			//      $(".shuiqianNum").html(price+'元');
			//      $(".shuihouNum").html(shuihouPrice+'元');
			// }
			//判断跟单推单
			if ((res.data.followStatus == 1 || res.data.followStatus == 2) && res.data.pushOrderDetailVO) {
				var profitOdds,
					follows,
					followAmt,
					expertName,
					commissionRate,
					profitOddsNum,
					commission;
				res.data.pushOrderDetailVO.follows ? follows = res.data.pushOrderDetailVO.follows + "人" : follows = "0人"; //人气（跟单人数）
				res.data.pushOrderDetailVO.commissionRate ? commissionRate = parseFloat(res.data.pushOrderDetailVO.commissionRate) +
					"%" : commissionRate = "0%"; //人气（跟单人数）
				res.data.pushOrderDetailVO.followAmt ? followAmt = res.data.pushOrderDetailVO.followAmt + "元" : followAmt =
					"0元"; //跟单金额
				res.data.pushOrderDetailVO.profitOdds ? profitOdds = (res.data.pushOrderDetailVO.profitOdds *100 ).toFixed(0) +
					"%" :
					profitOdds = "0"; //盈利率
				res.data.pushOrderDetailVO.profitOdds ? profitOddsNum = res.data.pushOrderDetailVO.profitOdds * 100:
					profitOddsNum = "0"; //盈利率Math.round(num*100)/100
				res.data.pushOrderDetailVO.expertName ? expertName = res.data.pushOrderDetailVO.expertName : expertName = "不留名";
				res.data.pushOrderDetailVO.commission ? commission = parseInt(res.data.pushOrderDetailVO.commission * 1) + "元" :
					commission =
					"0元"; //佣金
				res.data.pushOrderDetailVO.openStatus ? openStatus = res.data.pushOrderDetailVO.openStatus : openStatus = 0; //开奖状态0：开赛后公开；1：开奖后公开；2：保密

				switch (openStatus) {
					case 0:
						openStatus = "开赛后公开";
						break;
					case 1:
						openStatus = "开奖后公开";
						break;
					case 2:
						openStatus = "保密";
						break;
					default:
						openStatus = "未知";
						break;
				};
				console.log('状态' + openStatus);
				if (res.data.followStatus == "1") {
					console.log('跟单');
					var html =
						`<div class='container-list-content-list-fayq'>
							<span class='fayq-1'>跟单人数：</span><span class='container-fayq-num gdje'>` +
						follows +
						`</span>
						</div>
						<div class='container-list-content-list-fayq'>
							<span class='fayq-1'>跟单金额：</span><span class='container-fayq-num gdje'>` +
						followAmt +
						`</span>
						</div>
						<div class='container-list-content-list-fayq'>
							<span class='fayq-1'>佣金比例：</span><span class='container-fayq-num gdje'>` +
						commissionRate +
						`</span>
						</div>
						<div class='container-list-content-list-fayq fazj'>
							<span class='fayq-1'>方案专家：</span><span class='container-fayq-num gdje'>` +
						expertName +
						`</span>
						</div>

						<div class='container-list-content-list-fayq yll'>
							<span class='fayq-1'>盈利率：</span><span class='container-fayq-num gdje red'>` +
						profitOdds +
						`</span>
						</div>
						<div class='container-list-content-list-fayq zfyj'>
							<span class='fayq-1'>支付佣金：</span><span class='container-fayq-num gdje red'>` +
						commission + `</span>
						</div>`;
					$(".gd-container-cp").append(html);

					if (res.data.status <= 2) {
						var html11 =
							'<div style="position: relative;bottom:0.07rem;padding-left: 40%;background-color: #d4cccc;line-height: 3rem;height: 3rem;">开赛后公开</div>';
						$(".result .resultMain ").css("display", "none");
						// $(".result").append(html11);
						$(".yll").css("display", "none");
						// $(".fazj").css("display", "none");
						$(".zfyj").css("display", "none");
					}
					//已下单
					// 										if(status >= 4 && status <= 6) {
					// 											$(".yll").css("display", "block");
					// 										}
					if (res.data.orderBetJson == null || res.data.orderBetJson == "undefined" || res.data.orderBetJson ==
						undefined) {
						$(".touzhuxinxi1 ").css("display", "none");
						$(".touzhuxinxi ").css("display", "none");
						$(".result ").css("margin-bottom", "3vw");

						var html11 =
							'<div style="bottom:0.07rem;padding-left: 46%;color: #a0a0a0;background-color: rgb(240, 240, 240);line-height: 3rem;height: 3rem;">' +
							openStatus + '</div>';
						$(".result .resultMain ").css("display", "none");
						$(".result").append(html11);
						$(".icscr").css("display", "block");
						//						$(".yll").css("display", "none");
						//						$(".zfyj").css("display", "none");
					} else {
						$(".result .resultMain ").css("display", "flex");
					}

					$(".gd-container").css("display", "block");
					$(".cpQishu").html(res.data.pushOrderDetailVO.betType);
				} else if (res.data.followStatus == "2") {
					console.log('推单');
					var html =
						`<div class='container-list-content-list-fayq'>
							<span class='fayq-1'>跟单人数：</span><span class='container-fayq-num gdje'>` +
						follows +
						`</span>
						</div>
						<div class='container-list-content-list-fayq'>
							<span class='fayq-1'>跟单金额：</span><span class='container-fayq-num gdje'>` +
						followAmt +
						`</span>
						</div>
						<div class='container-list-content-list-fayq'>
							<span class='fayq-1'>佣金比例：</span><span class='container-fayq-num gdje '>` +
						commissionRate +
						`</span>
						</div>

						<div class='container-list-content-list-fayq'>
							<span class='fayq-1'>盈利率：</span><span class='container-fayq-num gdje red'>` +
						profitOdds +
						`</span>
						</div>
						<div class='container-list-content-list-fayq'>
							<span class='fayq-1'>佣金收益：</span><span class='container-fayq-num gdje red'>` +
						commission +
						`</span>
						</div>
						<div class='container-list-content-list-fayq bmxy'>
							<span class='fayq-1'>保密设置：</span><span class='container-fayq-num gdje red'>` +
						openStatus + `</span>
						</div>`;
					//<p style="color: red;display:` + dysy + `;">中奖奖金收益低于10%不收佣金</p>`;
					$(".gd-container-cp").append(html);
					$(".gd-container").css("display", "block");
					if (res.data.status > 2) {
						$(".bmxy").css("display", "none");
					}

					if (profitOddsNum < "20") {
						$(".bsyj").css("display", "block");
					}

				} else {
					$(".gd-container").css("display", "none");
				}
			}
		};
	});
	// $('body').css("display", "block");

});